Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

chore(deps): update dependency axios-mock-adapter to v2 #397

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 13, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
axios-mock-adapter 1.21.5 -> 2.1.0 age adoption passing confidence

Release Notes

ctimmerm/axios-mock-adapter (axios-mock-adapter)

v2.1.0

Compare Source

  • Migrate to modern js https://github.com/ctimmerm/axios-mock-adapter/pull/393
    • ♻️ Migrate internal handler to an object
    • 🎁 Migrate handlers and history to a flat array. That way one only needs to check the history array to see all requests. The verbs on the array are still exposed, so there's no downside.
    • ♻️ Migrate to ES2022
    • ♻️ Migrate to Class
    • ♻️ Migrate to async/await
    • 🎁 Add MockResponse types

v2.0.0

Compare Source

Breaking Changes 💥
  • Drop node versions lower than v18 (https://github.com/ctimmerm/axios-mock-adapter/pull/390)

  • Change the parameters of the methods to align it to the one of axios. (https://github.com/ctimmerm/axios-mock-adapter/pull/387)
    The last parameter must be a config object with {params, headers} instead of just the headers.
    If you've always only used two parameters, you won't have to change anything.

    Methods with data param:

    • mock.onPost(url, data, headers) > mock.onPost(url, data, {params, headers})
    • mock.onPut(url, data, headers) > mock.onPost(url, data, {params, headers})
    • mock.onPatch(url, data, headers) > mock.onPatch(url, data, {params, headers})
    • mock.onAny(url, data, headers) > mock.onAny(url, {data, params, headers})

    Methods without data param:

    • mock.onGet(url, {params}, headers) > mock.onGet(url, {params, headers})
    • mock.onDelete(url, {params}, headers) > mock.onDelete(url, {params, headers})
    • mock.onHead(url, {params}, headers) > mock.onHead(url, {params, headers})
    • mock.onOptions(url, {params}, headers) > mock.onOptions(url, {params, headers})

    An error is reported if one accidentally passes the headers directly instead of `{headers: {}}.

    e.g. Error: Invalid config property Header-test provided to onPatch. Config: {"Header-test":"test-header"}

v1.22.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Sep 13, 2024
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.75%. Comparing base (134c08e) to head (adcae77).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #397   +/-   ##
=======================================
  Coverage   65.75%   65.75%           
=======================================
  Files          33       33           
  Lines         330      330           
  Branches       75       75           
=======================================
  Hits          217      217           
  Misses        108      108           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/axios-mock-adapter-2.x branch from b774b43 to ceb4550 Compare September 20, 2024 16:00
@renovate renovate bot force-pushed the renovate/axios-mock-adapter-2.x branch from ceb4550 to bf82936 Compare October 9, 2024 16:58
@renovate renovate bot force-pushed the renovate/axios-mock-adapter-2.x branch from bf82936 to fb343ac Compare October 24, 2024 16:21
@renovate renovate bot force-pushed the renovate/axios-mock-adapter-2.x branch from fb343ac to adcae77 Compare November 1, 2024 13:39
@feanil feanil closed this Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant